package com.devframe.sysbase.model.base;

import java.io.Serializable;

import com.devframe.sysbase.model.TSysLogon;
import com.devframe.sysbase.model.TSysOperatorLog;


/**
 * This is an object that contains data related to the T_SYS_LOGON table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="T_SYS_LOGON"
 */

public abstract class BaseTSysLogon  implements Serializable {

	public static String REF = "TSysLogon";
	public static String PROP_LOGIN_TIME = "loginTime";
	public static String PROP_LOGIN_STATUS = "loginStatus";
	public static String PROP_USER_ORG = "userOrg";
	public static String PROP_USER_ID = "userId";
	public static String PROP_FAILURE_REASON = "failureReason";
	public static String PROP_LOGIN_IP = "loginIp";
	public static String PROP_ID_CARD = "idCard";
	public static String PROP_EXIT_TIME = "exitTime";
	public static String PROP_LOGIN_ID = "loginId";
	public static String PROP_LOGIN_HOST = "loginHost";
	public static String PROP_ORG_NAME = "orgName";
	public static String PROP_USER_NAME = "userName";
	public static String PROP_ONLINE_COUNT = "onlineCount";


	// constructors
	public BaseTSysLogon () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTSysLogon (java.lang.String loginId) {
		this.setLoginId(loginId);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String loginId;

	// fields
	private java.lang.String userId;
	private java.lang.String userName;
	private java.lang.String loginTime;
	private java.lang.String exitTime;
	private java.lang.String loginHost;
	private java.lang.String loginIp;
	private java.lang.String loginStatus;
	private java.lang.String failureReason;
	private java.lang.String userOrg;
	private java.lang.String orgName;
	private java.lang.String idCard;
	private java.lang.Integer onlineCount;

	// collections
	private java.util.Set tSysOperatorLogs;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid.hex"
     *  column="LOGIN_ID"
     */
	public java.lang.String getLoginId () {
		return loginId;
	}

	/**
	 * Set the unique identifier of this class
	 * @param loginId the new ID
	 */
	public void setLoginId (java.lang.String loginId) {
		this.loginId = loginId;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: USER_ID
	 */
	public java.lang.String getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: USER_ID
	 * @param userId the USER_ID value
	 */
	public void setUserId (java.lang.String userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: USER_NAME
	 */
	public java.lang.String getUserName () {
		return userName;
	}

	/**
	 * Set the value related to the column: USER_NAME
	 * @param userName the USER_NAME value
	 */
	public void setUserName (java.lang.String userName) {
		this.userName = userName;
	}



	/**
	 * Return the value associated with the column: LOGIN_TIME
	 */
	public java.lang.String getLoginTime () {
		return loginTime;
	}

	/**
	 * Set the value related to the column: LOGIN_TIME
	 * @param loginTime the LOGIN_TIME value
	 */
	public void setLoginTime (java.lang.String loginTime) {
		this.loginTime = loginTime;
	}



	/**
	 * Return the value associated with the column: EXIT_TIME
	 */
	public java.lang.String getExitTime () {
		return exitTime;
	}

	/**
	 * Set the value related to the column: EXIT_TIME
	 * @param exitTime the EXIT_TIME value
	 */
	public void setExitTime (java.lang.String exitTime) {
		this.exitTime = exitTime;
	}



	/**
	 * Return the value associated with the column: LOGIN_HOST
	 */
	public java.lang.String getLoginHost () {
		return loginHost;
	}

	/**
	 * Set the value related to the column: LOGIN_HOST
	 * @param loginHost the LOGIN_HOST value
	 */
	public void setLoginHost (java.lang.String loginHost) {
		this.loginHost = loginHost;
	}



	/**
	 * Return the value associated with the column: LOGIN_IP
	 */
	public java.lang.String getLoginIp () {
		return loginIp;
	}

	/**
	 * Set the value related to the column: LOGIN_IP
	 * @param loginIp the LOGIN_IP value
	 */
	public void setLoginIp (java.lang.String loginIp) {
		this.loginIp = loginIp;
	}



	/**
	 * Return the value associated with the column: LOGIN_STATUS
	 */
	public java.lang.String getLoginStatus () {
		return loginStatus;
	}

	/**
	 * Set the value related to the column: LOGIN_STATUS
	 * @param loginStatus the LOGIN_STATUS value
	 */
	public void setLoginStatus (java.lang.String loginStatus) {
		this.loginStatus = loginStatus;
	}



	/**
	 * Return the value associated with the column: FAILURE_REASON
	 */
	public java.lang.String getFailureReason () {
		return failureReason;
	}

	/**
	 * Set the value related to the column: FAILURE_REASON
	 * @param failureReason the FAILURE_REASON value
	 */
	public void setFailureReason (java.lang.String failureReason) {
		this.failureReason = failureReason;
	}



	/**
	 * Return the value associated with the column: USER_ORG
	 */
	public java.lang.String getUserOrg () {
		return userOrg;
	}

	/**
	 * Set the value related to the column: USER_ORG
	 * @param userOrg the USER_ORG value
	 */
	public void setUserOrg (java.lang.String userOrg) {
		this.userOrg = userOrg;
	}



	/**
	 * Return the value associated with the column: ORG_NAME
	 */
	public java.lang.String getOrgName () {
		return orgName;
	}

	/**
	 * Set the value related to the column: ORG_NAME
	 * @param orgName the ORG_NAME value
	 */
	public void setOrgName (java.lang.String orgName) {
		this.orgName = orgName;
	}



	/**
	 * Return the value associated with the column: ID_CARD
	 */
	public java.lang.String getIdCard () {
		return idCard;
	}

	/**
	 * Set the value related to the column: ID_CARD
	 * @param idCard the ID_CARD value
	 */
	public void setIdCard (java.lang.String idCard) {
		this.idCard = idCard;
	}



	/**
	 * Return the value associated with the column: ONLINE_COUNT
	 */
	public java.lang.Integer getOnlineCount () {
		return onlineCount;
	}

	/**
	 * Set the value related to the column: ONLINE_COUNT
	 * @param onlineCount the ONLINE_COUNT value
	 */
	public void setOnlineCount (java.lang.Integer onlineCount) {
		this.onlineCount = onlineCount;
	}



	/**
	 * Return the value associated with the column: TSysOperatorLogs
	 */
	public java.util.Set getTSysOperatorLogs () {
		return tSysOperatorLogs;
	}

	/**
	 * Set the value related to the column: TSysOperatorLogs
	 * @param tSysOperatorLogs the TSysOperatorLogs value
	 */
	public void setTSysOperatorLogs (java.util.Set tSysOperatorLogs) {
		this.tSysOperatorLogs = tSysOperatorLogs;
	}

	public void addToTSysOperatorLogs (TSysOperatorLog tSysOperatorLog) {
		if (null == getTSysOperatorLogs()) setTSysOperatorLogs(new java.util.TreeSet());
		getTSysOperatorLogs().add(tSysOperatorLog);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof TSysLogon)) return false;
		else {
			TSysLogon tSysLogon = (TSysLogon) obj;
			if (null == this.getLoginId() || null == tSysLogon.getLoginId()) return false;
			else return (this.getLoginId().equals(tSysLogon.getLoginId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getLoginId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getLoginId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}